Windows

A JavaScript window is a complex object. It must keep track of context in various ways. Pointers keep track of a window's place within the navigator hierarchy. Each window contains pointers to :

  • Its parent, the window which owns it;
  • Its topmost ancestor (top); and
  • Its self.

    Windows store a list of subframes (frames) to track dependents. Additionally:

  • The history array remembers previous URLs;
  • The location points to the current URL; and
  • The document stores information about the presentation and content of the current page.

    Please refer to the communications overview for further information about document methods. The Window Inspector gives an excellent hands-on approach to understanding window structures. The JavaScript window hierarchy looks something like this:

    Copyright ©2000 by Charles River Media, All Rights Reserved